package com.xbongbong.paas.pojo.workflow.settings.vo;

import com.xbongbong.paas.field.LinkInfoPojo;
import com.xbongbong.workflow.pojo.FilterCondition;
import lombok.Getter;
import lombok.Setter;
import lombok.ToString;

import javax.validation.constraints.NotEmpty;
import javax.validation.constraints.NotNull;

/**
 * @author 吴峰
 * @date 2021/05/31 14:25
 */
@Getter
@Setter
@ToString
public class FilterConditionVO extends FilterCondition {
    private static final long serialVersionUID = -8394807025690101955L;

    private String nodeName;


    /**
     * attr的linkedType
     */
    private Integer linkedType;
    /**
     * attr的 linkInfoPojo
     */
    private LinkInfoPojo linkInfo;
    /**
     * valueAttr的linkedType
     */
    private Integer thisLinkedType;
    /**
     * valueAttr的 linkInfoPojo
     */
    private LinkInfoPojo thisLinkInfo;

    public FilterConditionVO(String nodeName, Integer targetSaasMark, Integer targetBusinessType, Long targetFormId, Long targetWorkflowNodeId, Integer triggerNodeFlag,
                             @NotEmpty(message = "目标表单字段不能为空") String attr, @NotNull(message = "字段类型不能为空") Integer fieldType, String attrName,
                             @NotEmpty(message = "操作标示不能为空") String symbol, @NotNull(message = "值类型不能为空") Integer valueType,
                             Object value, String valueAttr, Integer valueFieldType, String valueAttrName, @NotEmpty(message = "搜索条件不能为空") String rel) {
        super(targetSaasMark, targetBusinessType, targetFormId, targetWorkflowNodeId, triggerNodeFlag, attr, fieldType, attrName, symbol, valueType, value, valueAttr,
                valueFieldType, valueAttrName, rel);
        this.nodeName = nodeName;
    }
}
